package com.web.controller;

import com.jfinal.core.Controller;
import com.web.model.CardLaunchRecord;
import com.web.model.UserModel;
import org.apache.log4j.Logger;

/**
 * Created by reeveslee on 16/7/5.
 */
public class ShareController extends Controller {
    private static final Logger LOGGER = Logger.getLogger(ShareController.class);

    public void page() {
        int userId = getParaToInt(0);
        int launchCardId = getParaToInt(1);
        setAttr("user_info", UserModel.userDao.findById(userId));
        setAttr("launch_info", CardLaunchRecord.cardLaunchRecordDao.findById(launchCardId));
        setAttr("imgs",CardLaunchRecord.cardLaunchRecordDao.getLaunchImgs(launchCardId));

        renderJsp("/shareout.jsp");
    }
}
